package com.yxym;

public class CupNum {
    public static void main(String[] args) {
        Runtime runtime = Runtime.getRuntime();
        int cupName = runtime.availableProcessors();
        //获取CPU的个数
        System.out.println("cpu个数=" + cupName);
    }
}
